{extend name="public/base" /}
{block name="content"}
<!-- Page Content -->
<div class="page-content">
    <!-- Page Breadcrumb -->
    <div class="page-breadcrumbs">
        <ul class="breadcrumb">
            <li>
                <a href="#">系统</a>
            </li>
            <li class="active">类型管理</li>
        </ul>
    </div>
    <!-- /Page Breadcrumb -->

    <!-- Page Body -->
    <div class="page-body">

        <button type="button" tooltip="添加类型" class="btn btn-sm btn-azure btn-addon"
                onClick="javascript:window.location.href = 'add.html'"><i class="fa fa-plus"></i> Add
        </button>
        <div class="row">
            <div class="col-lg-12 col-sm-12 col-xs-12">
                <div class="widget">
                    <div class="widget-body">
                        <div class="flip-scroll">
                            <form action="" method="post">
                                <table class="table table-bordered table-hover">
                                    <thead class="">
                                    <tr>
                                        <th class="text-center" >ID</th>
                                        <th class="text-center" >类型名称</th>
                                        <th class="text-center" >操作</th>
                                    </tr>
                                    </thead>
                                    {volist name="data" id="cate"}
                                    <tbody>
                                    <tr>
                                        <td align="center">{$cate.id}</td>
                                        <td align="center">{$cate.tname}</td>
                                        <td align="center">
                                            <a href="{:url('Type/edit',array('id'=>$cate['id']))}" class="btn btn-primary btn-sm shiny">
                                                <i class="fa fa-edit"></i>编辑
                                            </a>
                                            <a href="#" onClick="warning('确实要删除吗', '{:url(\'Type/del\',array(\'id\'=>$cate[\'id\']))}')"
                                               class="btn btn-danger btn-sm shiny">
                                                <i class="fa fa-trash-o"></i> 删除
                                            </a>
                                        </td>
                                    </tr>
                                    </tbody>
                                    {/volist}
                                </table>
                            </form>
                        </div>
                        <div style="padding-top: 10px;width: 230px">
                            {$data->render()}
                        </div>
                        <div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
    <!-- /Page Body -->
</div>
<!-- /Page Content -->
{/block}